set date brit
set centu on

Close data
use paciente 
set order to tag interno
sele 0
use movmento
set relation to paciente into paciente

select 0
use convenio
set order to tag codigo
sele paciente

set relation to convenio into convenio

Select movmento

copy to ant0504 for left(convenio.nome,1)='P' and data < {30-04-2005}

dele for left(convenio.nome,1)='P' and data < {30-04-2005}
